package recursive;

public class Recursive {

    public static void main(String[] args) {
        int sum = 0;
        System.out.println(sum(sum,10));
    }

    private static int sum(int sum,int i){
        if(i == 1){
            return 1;
        }else{
            sum += i * sum(sum,i-1);
        }
        return sum;
    }
}
